const mysql = require("mysql");

// const getConnection = () => {
//     return mysql.createConnection({
//         host: "localhost",
//         user: "root",
//         password: "123456",
//         database: "test2111",
//     });
// }

const jdbcUtils = (() => {

    const getConnection = (config) => {
        return mysql.createConnection({
            host: config.host,
            user: config.user,
            password: config.password,
            database: config.database
        });
    }

    return {
        getConnection
    }
})()


module.exports = {
    jdbcUtils
}




